/*
 * @Author: jhw
 * @Date: 2025-08-05 11:12:00
 * @LastEditors: jhw
 * @LastEditTime: 2025-08-15 10:10:32
 * @Description:
 */
import type { defineComponent } from 'vue';
import type { OptionsProps, PicLink, TextProps } from './editProps';
import type { Material } from './material';

// 导出 vue 组件类型
export type VueComType = ReturnType<typeof defineComponent>;

export interface Status {
  type: VueComType;
  name: Material;
  id: string;
  status: {
    [key: string]: TextProps | OptionsProps;
  };
}

// 定义 updateStatus 的类型
export type UpdateStatus = (
  configKey: string,
  payload?: number | string | boolean | object,
  isShowChange?: boolean,
) => void;

export type GetLink = (obj: PicLink) => void;

export interface Res<T = any> {
  code: number;
  data: T;
  message: string;
}

export interface SurveyRes {
  id: number;
  surveyId: string;
  title: string;
  description: string;
  surveyCount: number;
  components: Status[];
  isDeleted: number;
  createTime: string;
  updateTime: any;
}
